Auto-focusing device

ABSTRACT

An auto-focusing device for stably drive a photographing lens to track a moving object comprises charge accumulation type photo-electric conversion means for accumulating charges at a predetermined time interval to produce a focus detection signal, defocus amount calculation means for calculating a defocus amount of the photographing lens based on the focus detection signal, drive distance calculation means for calculating a direction and a distance of the lens drive for driving the photographing lens to track the moving object based on at least the defocus amount, drive means for driving the photographing lens in accordance with the calculated direction and distance of the lens drive, and control means for supplying the direction and distance of the lens drive calculated by the drive distance calculation means to the drive means after the end of the next charge accumulation by the photo-electric conversion means to drive the photographing lens so that the photographing lens tracks the moving object.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an auto-focusing device of a camera,and more particularly to tracking-drive of a photographing lens toalways keep the photographing lens in focus to a moving object.

Related Background Art

An auto-focusing device having a so-called overlapped servo functionwhich servos a photographing lens into an in-focus position (hereinafterreferred to as an AF servo) during a charge accumulation period of acharge accumulation type photo-electric conversion element (hereinafterreferred to as an AF sensor) to enhance the tracking ability to a movingobject has been known. (For example, Japanese Laid-Open PatentApplication No. 2-146010).

The assignee of the present invention has proposed in (Japanese PatentApplication No. 2-256677) an auto-focusing device having a so-calledoverlap prediction drive function which detects the movement of anobject while conducting overlapped servo and predicts a position of theobject to drive a photographing lens.

FIG. 11 illustrates the overlap prediction drive method. An abscissarepresents a time t and an ordinate represents a distance Z on anoptical axis. A curve Q represent a distance on the optical axis betweenthe photographing lens and a focusing position of the object and itvaries as the object moves. On the other hand, a curve L represents adistance on the optical axis between the photographing lens and a filmplane. Accordingly, a difference between Q and L represents a defocusamount D. Times such as t(n) and t(n-1) are substantially center timesof accumulation times of the charge accumulation type AF sensor, andtime periods surrounded by lines parallel to the ordinate Z on theopposite sides of the center times represent charge accumulation times.D(n-1) and D(n) denote defocus amounts at the times t(n-1) and t(n),respectively. Hereinafter, the distance measurement time is representedby the time t(n) although the charge accumulation time for measuring thedistance is in actual required so long as the charge accumulation typeAF sensor is used. In the present specification, the measurement ofdistance means the charge accumulation of the charge accumulation typeAF sensor. In a drawing which illustrates the overlapped servo, theordinate, the abscissa and the curves Q and L are identical to those ofFIG. 11.

As seen from FIG. 11, a displacement P(n) of the focusing plane of theobject from the time t(n-1) to the time t(n) is determined from thedefocus amount D(n) detected by the measurement of distance at the timet(n), the previous defocus amount D(n-1) and a displacement M(n) of thephotographing lens between this period.

    P(n)=D(n)+M(n)-D(n-1)                                      (1)

Accordingly, an image plane velocity S(n) of the object is given by

    S(n)=P(n)/{t(n)-t(n-1)}                                    (2)

Assuming that the distance measurement period {t(n+1)-t(n)} issubstantially same for each time, a displacement of the object from thetime t(n) to the next distance measurement time t(n+1) may be predictedas P(n).

A data transfer time of a CCD and a calculation time for the defocusamount are included from the termination of the charge accumulation bythe AF sensor to the calculation of the defocus amount. In theoverlapped servo, the photographing lens is usually driven even duringthis period. Thus, when the lens drive distance is to be determinedbased on the calculated defocus amount, a correction must be made bytaking the displacement of the photographing lens during this periodinto account. Assuming that the end time of calculation of the defocusamount by the distance measurement at the time t(n) is tm(n) and thedisplacement of the photographing lens from the time t(n) to the timetm(n) is PD(n), a lens drive distance at the time tm(n), that is, atotal drive distance V(n) to be servoed such that the defocus amount atthe next distance measurement is zero is calculated in the followingmanner. Namely, the total drive distance V(n) is calculated by addingthe defocus amount D(n) measured at the time t(n) to the predicteddisplacement P(n) of the object from the time t(n) to the next distancemeasurement time t(n+1), and subtracting therefrom the lens drivedistance PD(n) from the time t(n) to the defocus amount calculation endtime tm(n). ##EQU1##

If the photographing lens is driven along the curve L1 in accordancewith the total drive distance V(n) calculated by the formula (3) duringthe period from the calculation end time tm(n) to the start of the nextdistance measurement, the defocus amount D(n+1) at the next measurementdistance is substantially zero. However, since the next distancemeasurement is started soon after the calculation of the defocus amountat the time tm(n), the period from the time tm(n) to the start of thenext distance measurement is very short, and it is difficult to drivethe photographing lens during that period because of a limit of a motorpower. The photographing lens is usually driven along a broken curve L2and the drive of the lens by the total drive amount V(n) calculated bythe formula (3) is not completed by the start of the next distancemeasurement. As a result, the photographing lens cannot catch up themoving object even if the control is updated by using the total drivedistance V(n) of the formula (3) as a servo target each time the defocusamount is calculated.

In order to solve this problem, in Japanese Patent Application No.2-256677 mentioned above, the correction amount to be subtracted whenthe total drive distance V(n) is calculated, that is, the lensdisplacement PD(n) from the time t(n) to the time tm(n) is ignored, andthe total drive distance V(n) calculated by ##EQU2## is servoed. As aresult, as shown in a curve L3, the photographing lens is driven inexcess of PD(n) from the predicted position of the object at the timet(n+1) so that the photographing lens approaches more closely to thecurve Q.

However, the latter auto-focusing device described above includes thefollowing problem.

In the prior art device, since the displacement of the lens during thecalculation period of the defocus amount is not taken into account incalculating the lens drive distance, the photographing lens is driven inexcess and the photographing lens finally passes the object at a certaindistance measurement time. Since the lens drive distance during thecalculation period of the defocus amount is not taken into account atthe next update of the servo, the photographing lens finally passes theobject by a fairly long distance and the total drive distance calculatedby the formula (4) becomes negative, when the lens drive is firststopped until a normal condition for the photographing lens to followthe object is recovered. As a result, the photographing lens passes theobject and stops, and passes the object and stops, and makes an unstableand discontinuous movement.

It is an object of the present invention to provide an auto-focusingdevice which stably drives a photographing lens to track a movingobject.

One aspect of the present invention as shown in FIG. 1 relates to anauto-focusing device comprises charge accumulation type photo-electricconversion means 101 for accumulating charges at a predetermined timeinterval in accordance with a focus detection light beam transmittedthrough a photographing lens to produce a focus detection signal;defocus amount calculation means 102 for calculating a defocus amountincluding a deviation between a focus plane of the focus detection lightbeam by the photographing lens and an anticipated focus plane and adirection of the deviation based on the focus detection signal after theend of each accumulation of the charge by the photo-electric conversionmeans 101; drive distance calculation means 103 for calculating adirection and a distance of lens drive for driving the photographinglens to track a moving object based on at least the defocus amountproduced by the defocus amount calculation means 102; drive means 104for driving the photographing lens in accordance with the direction andthe distance of the lens drive calculated by the drive distancecalculation means 103.

It further comprises control means 105 for supplying the direction andthe distance of the lens drive calculated by the drive distancecalculation means 103 to the drive means 104 after the end of the nextcharge accumulation by the photo-electric conversion means 101 to drivethe photographing lens.

The control means 105 supplies the direction and distance of the lensdrive calculated by the drive distance calculation means 103 to thedrive means after the end of the next charge accumulation by thephoto-electric conversion means 101 to drive the photographing lens.

In accordance with this aspect, the direction and distance of the lensdrive to drive the photographing lens to track the moving object arecalculated based on at least the defocus amount calculated after thecharge accumulation, and the photographing lens is driven after the endof the next charge accumulation in accordance with the calculateddirection and distance of the lens drive. Accordingly, the photographinglens can stably track the moving object and the tracking ability isimproved.

Another aspect of the present invention comprises drive distancecalculation means 103A for calculating the direction and the distance ofthe lens drive for making the photographing lens in focus at the (N+2)thcharge accumulation based on the defocus amount calculated at the end ofthe at least N-th charge accumulation by said photo-electric conversionmeans 101. The drive distance calculation means 103A calculates thedirection and distance of the lens drive for making the photographinglens in focus at the (N+2)th charge accumulation based on at least thedefocus amount calculated at the end of the N-th charge accumulation ofthe photo-electric conversion means 101.

In accordance with the second aspect, the direction and distance of thelens drive for making the photographing lens in focus at the (N+2)thcharge accumulation are calculated based on at least the defocus amountcalculated at the end of the N-th charge accumulation. Accordingly, thephotographing lens may be driven over a relatively long period from theend of the (N+1)th charge accumulation to the start of the (N+2)thcharge accumulation, and the tracking ability is improved as it is inthe first aspect.

A third aspect of the present invention comprises drive distancecalculation means 103B for calculating the direction and the distance ofthe lens drive by predicting a displacement of the object during arelease delay time from the release of a shutter to the light exposureto a film. The drive distance calculation means 103B calculates thedirection and distance of the lens drive by predicting the displacementof the object during the release delay time from the shutter release tothe light exposure to the film.

In accordance with the third aspect, the direction and distance of thelens drive are calculated by predicting the displacement of the objectduring the release delay period from the shutter release to the lightexposure to the film. Accordingly, the photographing lens can be broughtto an exact in focus position at the time of exposure for a fast movingobject.

A fourth aspect of the present invention comprises drive distancecalculation means 103C for calculating the direction and the distance ofthe lens drive by correcting a portion of the predicted displacement ofthe object during the release delay period. The drive distancecalculation means 103C calculates the direction and distance of the lensdrive by correcting a portion of the predicted displacement of theobject during the release delay period.

In accordance with the fourth aspect, the direction and distance of thelens drive are calculated by correcting a portion of the predicteddisplacement of the object during the release delay period. Accordingly,a similar effect to that of the third aspect is attained.

A fifth aspect of the present invention comprises control means 105Awhich does not output current direction and distance of the lens driveto the drive means 104 when the current direction of the lens drivecalculated by the drive distance calculation means 103-103C is differentfrom the previous direction of the lens drive. The control means 105Adoes not output the current direction and distance of the lens drive tothe drive means 104 when the current direction of the lens drivecalculated by the drive distance calculation means 103-103C is differentfrom the previous direction of the lens drive.

In accordance with the fifth aspect, the photographing lens is notdriven in accordance with the currently calculated direction anddistance of the lens drive when the currently calculated direction ofthe lens drive is different from the previous direction. Accordingly,the photographing lens is driven smoothly.

A sixth aspect of the present invention as shown in FIG. 1 relates to anauto-focusing device comprising: charge accumulation type photo-electricconversion means 201 for accumulating charges at a predetermined timeinterval in accordance with a focus detection light beam transmittedthrough a photographing lens to produce a focus detection signal;defocus amount calculation means 202 for calculating a defocus amountincluding a deviation between a focus plane of the focus detection lightbeam by the photographing lens and an anticipated focus plane and adirection of the deviation based on the focus detection signal after theend of each accumulation of the charge by the photo-electric conversionmeans 201; first drive distance calculation means 203 for calculating adirection and a distance of lens drive to drive the photographing lensto track a moving object based on at least the defocus amount producedby the defocus amount calculation means 202; lens displacement detectionmeans 204 for detecting actual direction and displacement of thephotographing lens; drive means 205 for driving the photographing lensin accordance with the direction and the distance of the lens drivecalculated by the first drive distance calculation means 203.

It further comprises displacement accumulation means 206 foraccumulating the direction and the displacement of the photographinglens detected by the lens displacement detection means 204; and seconddrive distance calculation means 207 for adding the accumulation of thedirection and the displacement accumulated by the displacementaccumulation means to the direction and distance of the lens drivecalculated by the first drive distance calculation means 203. The drivemeans 205 drives the photographing lens in accordance with a lens drivetarget calculated by the second drive distance calculation means 207.

In accordance with the sixth aspect, the direction and distance of thelens drive to drive the photographing lens to track the moving objectare added to the accumulation of the actual direction and displacementof the photographing lens to calculate the lens drive target for drivingthe photographing lens. Accordingly, the positions of the photographinglens at the respective times may be represented on a common scale, thecalculation of the lens drive distance in the auto-focusing control issimplified, and the control response is improved.

A seventh aspect of the present invention comprises lens displacementdetection means 204A including an encoder for generating a pulse signalfor each predetermined displacement of the photographing lens,displacement accumulation means 206A including a counter for countingpulse signals supplied from the lens displacement detection means 204Ato accumulate the direction and the displacement of the photographinglens, and second drive distance calculation means 207A for convertingthe direction and the distance of the lens drive calculated by the firstdrive distance calculation means 203 to a number of pulses perpredetermined displacement and adding the pulse count counted thedisplacement accumulation means 206A to the number of pulses tocalculate the lens drive target.

In accordance with the seventh aspect, the direction and displacement ofthe photographing lens are detected by the encoder and the pulse signalsfrom the encoder are counted to accumulate the actual direction anddisplacement of the photographing lens, and the direction and distanceof the lens drive converted to the number of pulses per predetermineddrive distance are added to the accumulated direction and displacementto calculate the lens drive target in order to drive the photographinglens. Accordingly, a similar effect to that of the sixth aspect isattained.

An eighth aspect of the present invention comprises 8. An auto-focusingdevice according to claim 6 drive means 205A which does not drive thephotographing lens in accordance with the current lens drive target whenthe direction of drive of the current lens drive target calculated bythe second drive distance calculation means 207A is different from thedirection of drive of the previous lens drive target.

In accordance with the eighth aspect, the photographing lens is notdriven in accordance with the currently calculated lens drive targetwhen the direction of drive of the currently calculated lens drivetarget is different from the direction of drive of the previous lensdrive target. Accordingly, the photographing lens is driven smoothly.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows flow charts of the present invention,

FIG. 2 shows a block diagram of one embodiment,

FIG. 3 illustrates a defocus amount,

FIG. 4 illustrates a tracking drive method of a photographing lens to amoving object,

FIG. 5 illustrates a tracking drive method of the photographing lens tothe moving object,

FIG. 6 illustrates a manner of tracking drive of the photographing lensin an embodiment,

FIG. 7 shows a flow chart of a control program for the tracking drive ofthe photographing lens to the moving object,

FIG. 8 shows a flow chart of a control program of the tracking drive ofthe photographing lens to the moving object,

FIG. 9 shows a flow chart of a moving object discrimination program,

FIG. 10 shows a flow chart of a moving object discrimination program,and

FIG. 11 illustrates a prior art tracking drive method of thephotographing lens to the moving object.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 2 shows a block diagram of a configuration of one embodiment.

A focus detection light beam from an object through a photographing lens1 is focused on an AF sensor 2 such as a CCD arranged in a camera body,and an optical image signal from the AF sensor 2 is sent to amicrocomputer (CPU) which controls an overall system, through aninterface 3.

An optical image pattern of the focus detection light beam projectedonto the AF sensor 2 is A/D converted by the interface 3 and outputtedto the CPU 4, or amplified to an appropriate signal level by theinterface 3 and A/D converted by an A/D converter built in the CPU 4.The CPU 4 processes the optical image pattern converted to the digitalsignal, by a predetermined algorithm to calculate a defocus amount, andcalculates a lens drive distance to make the photographing lens 1 infocus based on the defocus amount. An optical principle to detect thedefocus amount and an algorithm thereof are known and the descriptionthereof is omitted.

The photographing lens 1 is provided with an encoder 6 for monitoring adisplacement thereof, and the encoder 6 generates a pulse each time thephotographing lens 1 is moved by a predetermined distance along anoptical axis. The CPU 4 supplies the calculated lens drive distance to adriver 5 to drive a servo motor 7 to drive the photographing lens 1toward the in-focus position. The CPU 4 further monitors thedisplacement of the photographing lens 1 by a feedback pulse from theencoder 6, and when it counts up the feedback pulses by the numberdetermined by the defocus amount, it stops the drive of the servo motor7. Usually, the encoder 6 comprises a photo-interrupter arranged on arotary shaft of the servo motor 7 or a portion of reduction gears anddetects the rotation of the motor 7 which drive the photographing lens.

The defocus amount is defined as a relative image plane displacement ΔZbetween a plane (focusing plane) on which the focus detection light beamtransmitted through the imaging lens 1 is focused and a film plane(target focusing plane), and it is substantially equal to the lens drivedistance required to make the photographing lens 1 in focus.Accordingly, in order to focus (make in focus) the optical image to thefilm plane, the photographing lens 1 is driven backward by a defocusamount ΔZα in a near focus state, and the lens 1 is driven forward by adefocus amount ΔZβ in a far focus state. Strictly speaking, the defocusamount ΔZ is not equal to the lens drive distance although it is assumedin the present specification that both are equal.

FIG. 4 illustrates an overlap prediction drive of the present invention.

Like in the prior art device shown in FIG. 11, the defocus amount D(n)measured at the time t(n) is calculated at the time tm(n). In thepresent invention, however, the servo is not refreshed at the time tm(n)but the calculated defocus amount D(n) is stored. If the previous servois being executed, it is continued, and the servo is continued duringthe distance measurement period at the next measurement time t(n+1). Theservo is refreshed at a time tr(n) which is immediately after the end ofthe measurement at the next measurement time t(n+1). Namely, the refreshof the servo target based on one measurement is withheld until the endof the next measurement.

In the prior art, when the photographing lens 1 is to be driven based onthe measurement, a counter which counts up pulse signals from theencoder 6 is usually reset to zero if the counter is of increment typeand it is present if it is of decrement type in order to facilitate thecontrol because the setting of the number of pulses corresponding to thelens drive distance as the reference or the preset count of the counterwhen the servo is refreshed functions to set the target for the lensdrive distance.

In the present embodiment, however, the monitor pulses from the encoder6 which indicate the lens drive distance are simply accumulated by thecounter and the counter is not reset or preset each time the servo isrefreshed. This may be done by simply accumulating the monitor pulsesfrom the encoder 6 which indicate the lens drive distance by the counterand not modifying the count each time the servo is refreshed. Thismethod is hereinafter referred to as a linear count method. It isassumed that the control system may read the accumulated lens drivedistance any time. Thus, the count of the counter represents theposition of the photographing lens 1 on the optical axis and alsorepresents a distance between the photographing lens 1 and the filmplane. In FIG. 11, the ordinate represents the distance (mm) between thelens and the film plane or the object. In the linear count method, theordinate represents the count of the counter, for example, the countC(t(n)) at the time t(n). The image plane displacement (mm) along theoptical axis may be calculated by multiplying the number of pulses witha coefficient per pulse of the encoder 1 which is inherent to thephotographing lens.

The right ordinate in FIG. 4 represents the positions of thephotographing lens 1 and the object as scaled by the number of pulsesfrom the encoder 6.

By initializing the counter such that the count of the counter reaches apredetermined count when the photographing lens 1 is at a predeterminedposition (for example, the count is zero when the photographing lens 1is in focus to an infinite object), an absolute distance to the objectmay be determined from the count of the counter but such a process isnot necessary because only the displacement of the photographing opticalsystem, that is, the change in the position of the lens need bemeasured. In the present invention, the absolute number of pulses is notsignificant but the fact that a difference between the two countsrepresents the lens displacement during that period is utilized.

The Japanese Laid-Open Patent Application No. 2-146010 mentioned abovediscloses a method for calculating a mean measurement position of themeasurement system in the overlapped servo. The measurement position iscalculated by a relative value to the count. It indicates that the meanlens position in the measurement is counted as a pulse count C(t(n)) andit well matches to the linear count system. Thus, the displacement M(n)of the lens between two measurement times in the formula (1) is given by

    M(n)=f{C(t(n))-C(t(n-1))}                                  (5)

where f{ } is a function which converts the number of pulses to thedistance (mm). It may be approximated by multiplying a coefficient with{C(t(n))-C(t(n-1))}, as described above. The coefficient is inherent tothe photographing lens and differs from lens to lens. The object imageplane velocity S(n) given by the formula (2) may be readily determinedfrom the above.

In FIG. 4, even if the defocus amount D(n) at the time t(n) is storeduntil the end of the measurement at the time t(n+1) and the servo is notrefreshed at the time tm(n), the photographing lens 1 is usually drivenby the previous servo until the end of the measurement at the timet(n+1). If the count at the servo refresh time tr(n) is C(tr(n)) and themean measurement position during the measurement at the time t(n) isgiven by the count C(t(n)), a displacement EC(n) during this period isgiven by

    EC(n)=C(tr(n))-C(t(n))                                     (6)

This is the lens displacement as represented by the pulse count, and thedisplacement E(n) (mm) along the optical axis is given by the conversionfunction f{ } as follows.

    E(n)=f{EC(n)}                                              (7)

In this manner, the linear count method permits the representation ofthe lens positions at the respective times by the counts of the counteron the same scale and it is very advantageous. The prior art method inwhich the count is cleared for each refresh of the servo may be attainedby accumulating the lens drive distances calculated from time to time bythe microcomputer but it is complex and the linear count method isobviously superior in processing data. However, in the linear countmethod, when the servo target is set at the time of servo refresh, it isnecessary to convert the lens drive distance calculated from the defocusamount to a corresponding number of pulses and add the count of thecounter thereto. It is a new target position for the lens driverepresented by the count.

The servo target position at the time of servo refresh at the time tr(n)is also an anticipated object position θ(t(n+2)) of the measurement timeat the next time t(n+2). This position is determined by adding theobject position θ(t(n)) at the measurement time t(n) to the anticipatedobject displacement P(n) from the time t(n) to the time t(n+2). Namely,the anticipated object displacement P(n) is determined by multiplyingthe time {t(n+2)-t(n)} for the two measurement periods with the objectimage plane velocity S(n).

    P(n)={t(n+2)-t(n)}×S(n)                              (8)

where {t(n+2)-t(n)} is preferably dedicated from the past measurementperiods. For example, it may be assumed that{t(n+2)-t(n)}={t(n)-t(n-2)}.

Since the lens position at the time t(n) is retarded from the objectposition Q(n) by the defocus amount D(n) and the lens drive distancefrom the time t(n) to the time tr(n) is determined from the formula (7),a total drive distance V(n) to be driven at the time tr(n) is given by

    V(n)=D(n)+{t(n+2)-t(n)}×S(n)-E(n)                    (9)

By withholding the servo refresh until the end of the next measurement,the time from it to the start of measurement at the time t(n+2) can befully used to drive the lens. If the lens is driven over the target lensdrive distance during this period, the measured defocus amount D(n+2) atthe time t(n+2) is substantially zero as shown by a curve U1. If thelens drive is not completed before the start of the measurement at thetime t(n+2), the lens 1 is a little bit behind the object as shown by acurve U2. In this case, the measurement at the time t(n+2) is effectedin overlap with the lens drive. The servo may be terminated during themeasurement period at the time t(n+2) but, in any case, the servo isrefreshed based on the measurement at the time t(n+1) like the previouscase, at the time tr(n+1) after the end of the measurement. Accordingly,the photographing lens 1 may substantially stably track the object bythis method, and the photographing lens 1 is not substantially behindthe object nor does it pass the object so long as the object uniformlymoves and the measurement is exactly done.

In actual, however, the photographing lens 1 may pass the object due toa problem such as an irregular movement of the object, an error in themeasurement or a problem in the control of the drive of thephotographing lens 1. If the pass amount is large, the total drivedistance V(n) calculated by the formula (9) at the time of the servorefresh is negative. Namely, there is a possibility that thephotographing lens 1 passes the anticipated object position at the timet(n+2). In this case, the drive of the photographing lens 1 in thereverse direction is not effected in view of a possible impact to theuniformity of the lens drive and the mechanical backlash of the lensdrive system but the lens drive is stopped or the current servo targetis maintained. So long as the object moves in the same direction, thephotographing lens 1 will follow the object at the subsequentmeasurement time and the normal overlapped prediction movement isresumed.

The formula (9) shown above is used to calculate the object image planevelocity S(n) from the past measurement and the displacement of thephotographing lens 1, and predict the object position at the time t(n+2)based on it to determine the lens drive distance. Since the time t(n+2)is a future anticipated time when the servo is refreshed at the timetr(n), the following assumption is made in the calculation. ##EQU3##Accordingly, from the formulas (1), (2), (9) and (10), the total drivedistance V(n) of the photographing lens 1 is given by ##EQU4## Since theformula (11) does not include the time nor a division, the calculationis very simple.

In the Japanese Patent Application No. 2-256677 described above, theobject image plane velocity is not calculated from the two continuousmeasurements as is core in the formula (2) but it is calculated from themeasurement data separated by more than two periods in order to improvethe detection precision of the object image plane velocity. In thiscase, the formula (2) is slightly modified. For example, where theobject image plane is calculated in two periods, ##EQU5## where M₂ (n)is a displacement of the photographing lens 1 from t(n-2) to t(n). Byputting the formulas (12), (13) and (14) in the formula (9),

    V(n)=2D(n)-D(n-2)+M.sub.2 (n)-E(n)                         (15)

is given. FIG. 5 shows an object image plane velocity calculated in twomeasurement periods. The same is applied when the object image planevelocity is calculated from the measurement data separated by three ormore periods.

In the above discussion, it is aimed that the in-focus status isattained at the anticipated measurement time. However, as described inthe Japanese Patent Application No. 2-256677, a time period ofapproximately 60˜100 ms in required for the drive-up of an mirror andthe control of an iris after the camera shutter has been released andbefore the film is actually exposed to the light. Since the object movesduring the release delay period, it is necessary to drive thephotographing lens 1 for the displacement of the object during thisperiod. Further, since the lens drive takes a time determined by thedrive distance, the drive must be completed before the start of thelight exposure. Accordingly, it is preferable that the lens drivedistance after the release is small. Thus, the lens drive distance afterthe release is added and the lens drive target after the measurement isset ahead of the predicted object position at the next measurement time.As a result, the photographing lens 1 is driven for the lens drivedistance including one after the release and it is servoed to pass theobject. Specifically, a correction S for the lens drive amount after therelease is added to the formula (9) to get

    V(n)=D(n)+{t(n+2)-t(n)}×S(n)-E(n)+δ            (16)

The correction δ is given by

    δ=td×S(n)                                      (17)

where td is a time delay from the start of the release to the start ofthe light exposure

The above drive method means that the lens is driven in anticipation ofthe object displacement after the release at the time of the servorefresh. However, when the object image plane velocity S(n) is high orthe delay time td of the camera is long, the correction δ is large andthe image on a finder becomes defocused. Accordingly, it may beovercorrection if the amount calculated by the formula (17) is used asthe correction δ. Accordingly, an appropriate portion of the amountcalculated by the formula (17) is actually used as the correction δ.Namely,

    δ=η×td×S(n)                          (18)

where 0<η<1

By putting the formula (18) in the formula (16),

    V(n)=D(n)+{t(n+2)-t(n)+η×td}×S(n)-E(n)     (19)

is got.

By servoing the photographing lens 1 such that the photographing lens 1is always ahead of the object, the drive distance after the release canbe reduced, and the photographing lens 1 may be focused to the objectmoving at a higher speed, at the exposure time after the release thanthe photographing lens 1 without the correction. In FIG. 6, thecorrection δ to the drive amount during the release delay time is addedto drive the photographing lens 1. The lens 1 is driven to pass theobject in average.

FIGS. 7 and 8 show flow charts of the focusing control executed by theCPU 4. An operation of the embodiment is now explained with reference tothose flow charts.

In a step S1, the accumulation of charge by the AF sensor 2 is started.In a step S2, the end of the accumulation time of the AF sensor 2 ischecked based on an output level of a monitoring photo-sensor (notshown). The higher the brightness of the object is, the shorter is thecharge accumulation time. When the end of the accumulation is detected,the accumulation by the AF sensor 2 is terminated in a step S3. In thefollowing step S4, the focus detection signal outputted by the AF sensor2 is A/D converted, and in a step S5, whether a flag X which indicatesthat the tracking servo is in progress is "1" or not is determined. Ifthe flag X is "1", the process proceeds to a step S6, and otherwise itproceeds to a step S9. The status of the flag X is set based on a resultof a moving object test to be described later and the flag X is set to"1" if the tracking servo is in progress even if the lens is notactually driven.

In the step S6, the total drive amount V(n) is calculated by, forexample, the formula (9). In a step S7, whether the direction of driveof the photographing lens 1 is same as the previous one or not isdetermined. If it is the same direction, the process proceeds to a stepS8, and otherwise it proceeds to a step S9. In the step S8, the lensdrive amount is updated by the total drive amount V(n) calculated in theabove step to start the servo. If the previous servo is not yetcompleted, it is continued, and if it is completed, the lens is drivenagain in accordance with the updated drive amount V(n). If the drivedirection of the photographing lens 1 is opposite in the step S7, itmeans that the photographing lens 1 has passed the anticipated objectionposition. The reversal of the drive direction is not made as describedabove but the previous servo target is kept unupdated. If the trackingservo is not in progress in the step S5, the updating of the servotarget in the step S8 is also skipped.

In the stp S9, the AF calculation is effected. In the AF calculation,the defocus amount is calculated by applying an appropriate algorithm tothe A/D converted data of the output of the AF sensor 2 stored in amemory. Even during the calculation, the lens is driven in parallel. Ina step S10, whether the algorithm has suceeded or not is checked. If ithas succeeded, the process proceeds to a step S11 of FIG. 8 andotherwise it returns to a step S1. The algorithm fails when the objecthas a low contrast or the output level of the AF sensor 2 isinappropriate. If the algorithm succeeds, the calculated defocus amountD(0) is stored and the latest object image plane velocity S(0) iscalculated in a step S11 of FIG. 8, and the measurement data of severalpast generations comprising sets of defocus amount, measurement time andpulse count (lens position) at the time of measurement are updated forthe next object image plane velocity calculation. Specifically, the dataof the oldest generation in the memory area in discarded and a new setof data is stored. In this manner, the memory area of the CPU 4 may bereduced. The number of generations to be stored depends on the maximumnumber of generations for the measurement data in calculating the objectimage plane velocity, as disclosed in the Japanese Laid-Open PatentApplication No. 2-146010. In a step S11, the history of the object imageplane velocity S(n) is also updated.

In a step S12, a sub-routine of the moving object discrimination testshown in FIGS. 9 and 10 to be described later is executed. In a stepS13, whether the object is moving or not is determined, and if it ismoving, the process proceeds to a step S14 and otherwise it proceeds toa step S16. In the step S14, whether the tracking servo is in progressor not is determined, and if it is in progress, the process returns tothe step S1 of FIG. 7, and if it is not in progress, the processproceeds to a step S15. If the tracking servo is in progress, the servotarget is updated in the step S8 as described above. In order to improvethe response, the servo target is calculated for a stationary objectwhen the tracking servo is first initiated and the process proceeds to astep S15 to conduct the same servo as the ordinal overlapped servo. Inthe step S15, the flag X is set, and in a step S16, the flag X is reset.In a step S17, the lens displacement from the measurement time to theend time of the defocus amount calculation is subtracted from thedefocus amount for the correction. Specifically, the total drivedistance V(n) is calculated by setting the object image plane velocityto zero in the formula (9).

    V(n)=D(n)-E(n)                                             (20)

In a step S18, the servo target is updated by the calculated total drivedistance V(n) and the process returns to the step S1 of FIG. 7.

The moving object discrimination disclosed in the Japanese PatentApplication No. 2-256677 mentioned above is now explained with referenceto FIGS. 9 and 10.

Steps S21-S24 are same as the steps S1-S4 of FIG. 7 and the explanationthereof is omitted. In a step S25, the defocus amount is calculated bythe AF algorithm. In the following step S26, the object image planevelocity S(n) is calculated by the formula (13). In a step S27, the lensdrive distance V(n) is calculated by the formula (4). In a step S28, thedrive distance V(n) is updated. In a step S29 of FIG. 10, whether thepolarities of the object image plane velocities at the three consecutivemeasurements are same or not, that is, whether the movement of theobject toward or away from the photographing lens 1 is stable or not isdetermined. If all are equal, a stationary object is determined in astep S36. In this manner, the unidirectional movement of the object isdetected.

In steps S30, S31 and S32, the object image plane velocities S(n)calculated at the predetermined time interval are compared withrespective thresholds. Namely, S(0)>2 mm/sec is checked in the step S30,S(1)>1.5 mm/sec is checked in the step S31, and S(2)>1 mm/sec is checkedin the step S32. In the step S30, the moving object is not determinedunless the object image plane velocity exceeds 2 mm/sec at least once.If the history of the past velocities shows some acceleration in thefollowing steps S30-S32, the moving object is determined in a step S35.

When the tracking servo is initiated from the non-tracking state bydetecting the moving object, it can return to the normal servo statewhen S(0)≦1 mm/sec is detected in the step S33. Namely, once thetracking mode is started, it is hardly terminated. In the presentembodiment, once the tracking servo is initiated for the object havingthe velocity of higher than 2 mm/sec at least once is maintained unlessthe velocity goes down to 1 mm/sec. If the velocity detected during thetracking is 1 mm/sec<=S(0)≦2 mm/sec, the decision in the step S34 isaffirmative if the tracking servo has been initiated previously bydetecting the moving object in the step S35, and the tracking servo iscontinued. If the decision in the step S34 is that the tracking servo isnot in progress, a stationary object is determined in a step S36.

In this manner, the total drive amount to make the photographing lens infocus is calculated at the time t(N+2) based on the defocus amountmeasured at the time t(n) and the object image plane velocity, and theservo is refreshed by the total drive distance at the next measurementtime t(n+1). Thus, the photographing lens can stably follow the movingobject and the tracking ability is improved. Further, since the totaldrive distance is calculated while taking the lens displacement duringthe release delay time into account, the corrective drive distance afterthe release is reduced and the photographing lens can be focused to theobject which is moving at a higher speed than the speed permitted in theprior art.

In the present embodiment, the AF sensor 2 corresponds to the chargeaccumulation type photo-electric conversion means, the microcomputer 4corresponds to the defocus amount calculation means, the drive distancecalculation means, the first and second drive distance calculationmeans, the control means and the displacement accumulation means, theencoder 6 corresponds to the lens displacement detection means, and thedriver 5 and the motor 7 correspond to the drive means.

What is claimed is:
 1. An auto-focusing device comprising:chargeaccumulation type photo-electric conversion means for accumulatingcharges at a predetermined time interval in accordance with a focusdetection light beam transmitted through a photographing lens to producea focus detection signal; defocus amount calculation means forcalculating a defocus amount including a deviation between a focus planeof the focus detection light beam by the photographing lens and ananticipated focus plane and a direction of the deviation based on thefocus detection signal after the end of each accumulation of the chargeby the photo-electric conversion means; drive distance calculation meansfor calculating a direction and a distance of lens drive for driving thephotographing lens to track a moving object based on at least thedefocus amount produced by the defocus amount calculation means; drivemeans for driving the photographing lens in accordance with thedirection and the distance of the lens drive calculated by the drivedistance calculation means; and control means for supplying thedirection and the distance of the lens drive calculated by the drivedistance calculation means to the drive means after the end of the nextcharge accumulation by the photo-electric conversion means to drive thephotographing lens.
 2. An auto-focusing device according to claim 1wherein said drive distance calculation means calculates the directionand the distance of the lens drive for making the photographing lens infocus at the (N+2)th charge accumulation based on the defocus amountcalculated at the end of the at least N-th charge accumulation by saidphoto-electric conversion means.
 3. An auto-focusing device according toclaim 1 wherein said drive distance calculation means calculates thedirection and the distance of the lens drive by predicting adisplacement of the object during a release delay time from the releaseof a shutter to the light exposure to a film.
 4. An auto-focusing deviceaccording to claim 3 wherein said drive distance calculation meanscalculates the direction and the distance of the lens drive bycorrecting a portion of the predicted displacement of the object duringthe release delay period.
 5. An auto-focusing device according to claim1 wherein said control means does not output current direction anddistance of the lens drive to said drive means when the currentdirection of the lens drive calculated by said drive distancecalculation means is different from the previous direction of the lensdrive.